Fix shipping_method incorrectly sent to Amazon with imported default values (PCMT-1474)#79
Fix shipping_method incorrectly sent to Amazon with imported default values (PCMT-1474)#79
Conversation
…ilter null values (PCMT-1474) Agent-Logs-Url: https://github.com/lengow/plugin-prestashop/sessions/394f4513-0fb6-4d73-989d-53395654c8d8 Co-authored-by: michaelmaslengow <147600733+michaelmaslengow@users.noreply.github.com>
|
Il manque les traductions. |
Agent-Logs-Url: https://github.com/lengow/plugin-prestashop/sessions/55d31c36-58eb-4b8f-adc5-25386b70d444 Co-authored-by: michaelmaslengow <147600733+michaelmaslengow@users.noreply.github.com>
Added translations for all new UI strings in commit 48466f5. Changes:
|
|
Ca me donne : Missing Translation [admin.order.shipping_method_custom_label] Il faut pas build autre chose en local? |
Agent-Logs-Url: https://github.com/lengow/plugin-prestashop/sessions/d0f3bfd0-8ea0-42db-b40f-d4cf4b0023ab Co-authored-by: michaelmaslengow <147600733+michaelmaslengow@users.noreply.github.com>
The root cause was that the CSV files are generated from YAML source files by Fixed in commit |
LengowMarketplace.php: Only sendshipping_methodwhen required, or when optional and non-emptyLengowOrderController.php: Allow saving empty value to clear shipping_methodadmin_order_side.tpl: Add empty default option, free text input, filter null values, sync JSlengow_localetohookAdminOrderSidetemplate$lengow_locale->t(...)instead of hardcoded French stringstools/translate.phpOriginal prompt
Problem Statement
Context
Merchant reported issues with shipping_method parameter being sent incorrectly to Amazon, causing wrong shipping methods to appear on Amazon Seller Central (e.g., "Standard", "SecondDay" instead of the configured "ECONOMY").
Related Ticket: PCMT-1474
Account ID: 17025 (MAGNETRON S.A)
Marketplace: Amazon ES
Plugin Version: 3.9.4
PrestaShop Version: 1.7.8.8
Issues to Fix
1. Shipping method sent even when optional
shipping_methodas optional withaccept_free_values: true2. No free text input field
3. Dropdown shows pre-selected value when nothing is saved
4. "null" values appear in dropdown
lengow_code: null"Priority": {"label": "Priority", "lengow_code": null}Expected Behavior
✅ Only send shipping_method when:
✅ Allow free text input:
✅ Empty by default:
✅ Filter null values:
lengow_code: nullfrom dropdownFiles to Modify
Backend Changes
classes/models/LengowMarketplace.php(line 507-509)getAllParams()methodclasses/models/LengowHook.phpor controller preparing template dataclasses/controllers/LengowOrderController.php(save_shipping_method action)Frontend Changes
views/templates/hook/order/admin_order_side.tplAcceptance Criteria
Test Cases
Test Amazon order with no shipping_method set:
Test Amazon order with custom shipping_method:
This pull request was created from Copilot chat.